<!doctype html>
<html lang="en">

<%@ include file="Include_Professor_Imports.jsp"%>
<script>
function checkForm()
{
	var lastName = document.getElementById("lastName");
	var firstName= document.getElementById("firstName");
	var username = document.getElementById("username");
	var intExp = /^\d+$/;	
	var floatExp = /^[-+]?[0-9]+(\.[0-9]+)?$/;

	if (lastName.value == '' || lastName.value.indexOf('\\') !== -1 || lastName.value.indexOf('\'') !== -1 || lastName.value.indexOf('\"') !== -1)
	{
		alert('Please enter a valid Last Name.');
		return false;
	} 
	if (firstName.value == '' || firstName.value.indexOf('\\') !== -1 || firstName.value.indexOf('\'') !== -1 || firstName.value.indexOf('\"') !== -1)
	{
		alert('Please enter a valid First Name.');
		return false;
	} 
	if (username.value == '' || username.value.indexOf('\\') !== -1 || username.value.indexOf('\'') !== -1 || username.value.indexOf('\"') !== -1)
	{
		alert('Please enter a valid Username.');
		return false;
	} 
	return true;
}

</script>
<body>
<!-- HEADER -->
<div style="position: fixed; width: 100%; z-index: 1;">
<%@ include file="Include_Professor_Header.jsp"%>

<section id="secondary_bar">
<div class="user"><!-- <a class="logout_user" href="#" title="Logout">Logout</a> -->
</div>
<div class="breadcrumbs_container"><article class="breadcrumbs"><a
	href="ProfessorHomeServlet">Home</a>
<div class="breadcrumb_divider"></div>
<a class="current">My Profile</a></article></div>
</section>
<!-- end of secondary bar -->
</div>
<%@ include file="Include_Professor_Menu.jsp"%>

<section id="main" class="column">

<%@ include file="Include_Professor_Message.jsp"%>

<c:set var="professor" value="${sessionScope.professor}"></c:set>

<form method="post" action="ProfessorChangeProfileServlet">
<article class="module width_full">
<header>
<h3>Professor ID: <c:out value="${professor.userID }"></c:out> </h3>
</header>
<div class="module_content">
<fieldset style="width: 48%; float: left; margin-right: 3%;">
<label>First Name</label> <input name="professorFirstName" id="firstName" style="width: 92%;" type="text" value="${professor.firstName }">
</fieldset>
<fieldset style="width: 48%; float: left;"><label>Last
Name</label> <input name="professorLastName" id="lastName" style="width: 92%;" type="text" value="${professor.lastName}"></fieldset>
<div class="clear"></div>
<fieldset><label>Username</label> <input type="text" id="username" value="${professor.username}" readonly="readonly" >
</fieldset>
<div class="spacer"></div>
<div class="clear"></div>


</div>
<footer>
<div class="submit_link">
<input type="submit" value="Update" class="alt_btn" onclick="return checkForm()"> </div>
</footer>
</article>
</form>
<!-- end of post new article -->


<div class="spacer"></div>
</section>


</body>

</html>